﻿using System;
using System.Collections.Generic;
using System.Web.Profile;

using System.Web;
using System.Threading;

/// <summary>
/// Summary description for BasePage
/// </summary>
public class BasePage:System.Web.UI.Page
{
	public BasePage()
	{
	}
    protected override void InitializeCulture()
    {
        base.InitializeCulture();
        HttpCookie c = Request.Cookies["culture"];
        string culture = "vi-VN";
        if (c != null)
        {
            culture = c.Value;
        }
        Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(culture);
        Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(culture);
    }
    protected override void OnPreInit(EventArgs e)
    {
        base.OnPreInit(e);
        
        HttpCookie t = Request.Cookies["theme"];
        string theme = "Theme1";
        if (t != null)
        {
            theme = t.Value;         
        }
        this.Theme = theme;
    }

}